<template>
  <div class="page header-left">
    <base-header :leftIcon="null" title="数据快报"></base-header>

    <div class="p-20">
      <base-title>2023年6月</base-title>

      <!-- 表格 -->
      <div v-for="(t, tIndex) in tableJsons" :key="tIndex">
        <base-title :inline="true" v-if="t.title">{{ t.title }}</base-title>
        <base-table
          class="mb-20"
          :columns="t.columns"
          :datas="t.datas"
          @td-click="(v, i) => (tIndex === 0 ? onTdClick(v, i) : null)"
        ></base-table>
      </div>
    </div>

    <div class="footer bd-top"></div>
  </div>
</template>

<script>
import tableJsons from "./tableJsons";

export default {
  data() {
    return {
      tableJsons,
    };
  },

  onLoad() {},

  methods: {
    onTdClick({ d, v, i }) {
      if (i === 0) {
        uni.navigateTo({
          url: `/pages/index/page_${d.page >= 5 ? 5 : d.page}?title=${v.value}`,
        });
      }
    },
  },
};
</script>

<style lang="scss" scoped></style>
